package com.example.everything_is_possible;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

public class HomeActivity extends AppCompatActivity  {

    private Button mbtn_no2;
    private Button mbtn_no3;
    private Button mbtn_slide;


    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);

        //底部按钮跳转

        mbtn_no2 = findViewById(R.id.btn_no2);
        mbtn_no3 = findViewById(R.id.btn_no3);


        mbtn_no2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = null;
                intent = new Intent(HomeActivity.this, FenleiActivity.class);
                startActivity(intent);
            }
        });

        mbtn_no3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = null;
                intent = new Intent(HomeActivity.this, ZongheActivity.class);
                startActivity(intent);
            }
        });

        //按键侧滑副界面

        mbtn_slide = findViewById(R.id.btn_ex);

        mbtn_slide.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(HomeActivity.this, Ex_layoutActivity.class);
                startActivity(intent);
                overridePendingTransition(R.anim.in_from_left, R.anim.out_to_left);
            }
        });



    }
}